\<%@ page pageEncoding="UTF-8"%>
\<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
\<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
\<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
\<%@ taglib uri="http://www.ld.com/shield/tags" prefix="shield"%>
\<%@ taglib uri="http://www.ld.com/jsp/plugin" prefix="plugin"%>
\<%@ page trimDirectiveWhitespaces="true" %>
<fmt:setLocale value="zh_CN"/>
<% //权限判断 %>
<shield:permssion type="button">
<form action="\${ctxPathA}/${baseURL!}/addOrUpdate" method="post" autocomplete="off" class="show-info">
	<shield:token/>
    <input id="id" name="id" type="hidden" maxlength="100" value="\${model.id }">
    <table class="tab-show">
    	<colgroup>
    		<col width="20%">
    		<col width=""> 
    	</colgroup>
	<% for ( fieldModel in fieldList ) { %>
		<% 
		var classv = "";
		for (formvm in fieldModel.formvalidateMethods!) {
			classv = classv+" "+formvm;
	    }
	    %>
	    <% //排除不显示的字段 %>
		<% if ( fieldModel.isShowInUpdate ) { %>
		<tr>
			<th>
				<label><% /*非空，增加样式*/ %><% if (  strutil.contain (classv, "required") ) {
					%><font color="red">*</font><% } %>${fieldModel.comments}：</label>
			</th>
				<% //state用标签输出 %>
				<% if ( fieldModel.fieldName == "state"  ) { %>
			<td><shield:switchOput data="-1=删除|正常" value="\${model.state}"></shield:switchOput></td>
				<% //日期类型,字段类型或者input类型 %>
				<% } else if ( fieldModel.fieldType == "Date" || fieldModel.inputType == "date" ) { %>
         	<td><input type="text" name="${fieldModel.fieldName}" value="\${model.${fieldModel.fieldName}}" class="Wdate ${classv}"></td>
         		<% //textarea %>
				<% } else if ( fieldModel.inputType == "textarea" ) { %>
         	<td>
         		<textarea name="${fieldModel.fieldName}" style="width:99%;height:300px;" maxlength="400" class="${classv}">\${model.${fieldModel.fieldName}}</textarea>
         	</td>
         		<% /*富文本编辑器*/ %>
         		<% } else if ( fieldModel.inputType == "editor" ) { %>
         	<td>
         		<textarea id="ueditorContents" name="${fieldModel.fieldName}" class="ueditor ${classv}" style="width:99%;height:300px;" maxlength="400">\${model.${fieldModel.fieldName}}</textarea>
         	</td>
              	<% /*图片上传*/ %>
              	<% } else if ( fieldModel.inputType == "image" ) { %>
         	<td>
         	 	<plugin:images name="${fieldModel.fieldName}" imgSource="\${model.${fieldModel.fieldName}}" multi="false" ></plugin:images>
         	</td>
         		<% /*附件上传*/ %>
         		<% } else if ( fieldModel.inputType == "file" ) { %>
         	<td>
         	   <plugin:affix fileId="${fieldModel.fieldName}" fileName="affixName" filePath="affixPath"   fileIdValue="\${model.${fieldModel.fieldName}}" fileNameValue="\${model.affixName }" filePathValue=""  ></plugin:affix>
         	</td>
         		<% } else { %>
         	<td><input type="${fieldModel.inputType}" name="${fieldModel.fieldName}" class="${classv}" value="\${model.${fieldModel.fieldName}}"></td>
         		<% } %>
		</tr>
		<% } %>
	<% } %>
    </table>
    <div class="taCenter">
		<input class="button" type="submit" value="提交"/>
    	<input class="button default" type="reset" value="重置"/>
    </div>
</form>
</shield:permssion>